<%@ page isErrorPage="true" %>
<%@ page import = "java.util.Date" %>
<%@ page import = "java.util.Locale" %>
<%@ page import = "java.text.SimpleDateFormat" %>
<%
String contextRoot = request.getContextPath();
final String requestURL = request.getRequestURL().toString();
final String requestURI = request.getRequestURI();
final int index = requestURL.indexOf(requestURI);
final String retryURL = requestURL.substring(0, index) +
                     request.getAttribute("javax.servlet.error.request_uri");
SimpleDateFormat sdf = new SimpleDateFormat("dd 'de' MMMM 'de' yyyy 'a las' hh:mm:ss a zzz");
%>
<html>
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>SISDEP - Error</title>
        <link href="<%= contextRoot %>/css/estilos.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
	<table cellspacing="0" cellpadding="0" style="vertical-align:top">
	  <tr>
		<td>
		<table cellspacing="0" cellpadding="0" width="100%" height="20px">
		    <tr>
			  <td class="pageTitle" style="padding-left:8px"><p>Error</p></td>
			</tr>
		</table>
		</td>
	  </tr>
	  <tr align="center">
		<td height="20px" valign="top">
		<div align="center">
			<br>
			<br>
		</div>
		<table width="100%">
		  <tr>
			<td>
			<table width="600px" height="240px" align="center" cellpadding="0" cellspacing="0">
			  <tbody>
				<tr>
				  <td class="subtitle" colspan="2">Error</td>
				</tr>
				<tr>
				  <td width="135px">
				  	<img width="125px" height="125px" border="0" src="<%= contextRoot %>/images/it_Documentos.jpg">
				  </td>
				  <td width="370px" align="left">
				   <ul>
				   <li>
				   <strong>A ocurrido un error en el sistema: <br/><%=sdf.format(new Date())%></strong>. <br/>
				   Servidor: <strong><%= request.getServerName() %></strong><p />
				   </li>
				   <li>
					<strong>javax.servlet.error.request_uri: </strong><br/><%= request.getAttribute("javax.servlet.error.request_uri") %>
				   </li>
					<li>
					<strong>javax.servlet.error.exception: </strong><br/><%= request.getAttribute("javax.servlet.error.exception")%>
					</li>
					<li>
					<strong>javax.servlet.error.status_code: </strong><br/><%= request.getAttribute("javax.servlet.error.status_code")%>
					</li>
					<li>
					<strong>javax.servlet.error.servlet_name: </strong><br/><%= request.getAttribute("javax.servlet.error.servlet_name")%>
					</li>
					<li>
						<strong>Informaci&oacute;n del error: </strong><br/>
					  <%=exception.getMessage()%>
					  <%exception.printStackTrace();%>
					</li>
				  </ul>
				 </td>
				</tr>
				<tr>
				  <td colspan="2">
				  	<br>
				  </td>
				</tr>
			  </tbody>
			</table>
			</td>
		  </tr>
			<tr align="right"" class="subtitle">
				<td colspan="5"><a href="<%= contextRoot %>/index.html" target="_self" class="menuLinks">Volver al Men&uacute; Principal</a></td>
			</tr>
	  	</table>
	  </td>
	  </tr>
	  <tr>
		<td height="60px">&nbsp;</td>
	  </tr>	  
	</table>	
	</body>
</html>
